Method for testing a universal serial bus host controller

ABSTRACT

A chip test method is suitable for testing a universal serial bus host controller. First, the host controller and the client device are individually set in a test mode. Next, the client device performs a client-side test preparation action. In addition, the host controller performs a host-side test preparation action. The host controller sequentially outputs a number of requests to the client device. The client device, in response to the requests, outputs simulated responses individually to the host controller, wherein the simulated responses are selected from correct responses corresponding to the requests, possible faulty responses, and error responses that are possibly to be received by the host controller during actual operation. Finally, the host controller performs a verification test to verify whether the host controller works properly under the various simulated situations.

[0001] This application claims the benefit of Taiwan application Serial No. 091103068, filed on Feb. 21, 2002.

BACKGROUND OF THE INVENTION

[0002] 1. Field of the Invention

[0003] This invention relates to a chip test method, and more particularly to a method for testing a universal serial bus host controller.

[0004] 2. Description of the Related Art

[0005] The universal serial bus (USB) is an interface suitable for use in various kinds of peripheral devices. It can allow various kinds of computer peripheral devices to be connected with the host computer in a unified and standard manner. By using the universal serial bus, when the computer system is under operation, the computer system can communicate with its peripheral devices. Additionally, each of the peripheral devices can be selectively connected, installed, used, or removed when the computer system is operating to achieve the function of plug and play (PnP).

[0006]FIG. 1 schematically illustrates the coupling relationship between a USB host controller and a client device. The universal serial bus 106 needs a host controller 102 to control the communication with the peripheral devices attached to the bus. When the host controller 102 outputs a request rq via the universal serial bus 106 to the client device 104, the client device 104 sends a response rs to the host controller 102 according to the request rq. The request rq and the response rs are transmitted in the universal serial bus in the form of packet and the request rq must include the address and endpoint fields.

[0007] In general, the chip is to be tested after fabrication so as to verify its functions. The conventional method for testing the USB host controller is to output requests in sequence from the USB host controller to the client device, and the client device then sends the responses in the same sequence. The function of the host controller is then verified by checking whether or not the responses received by the host controller are correct.

[0008] The disadvantage of the conventional method for testing the host controller is that it can only test whether or not the action of the host controller is accurate during normal operations. During actual operations, there are many factors, such as the faulty action by the client devices or data packet loss due to bus congestion and so on, which will in some cases result in a host controller receiving a response that is irrelevant to the request. When the host controller encounters this kind of situation, the responses with error or fault may affect the behavior of the host controller and its subsequent actions, resulting in problems in operation. However, the conventional chip test method is neither capable of detecting such situation nor verifying that the host controller is still operating properly.

[0009] In addition, as the performance of the computer and its peripheral devices improves, the transmission rates provided by the conventional USB 1.0 and USB 1.1 cannot fulfil the requirements for high speed peripherals and applications. The latest USB standard, USB 2.0, can provide a faster transmission rate enabling high speed connections between a USB 2.0 compliant computer and its peripheral devices. However, the packet format of USB 2.0 is different from that of USB 1.x making the conventional chip test method unsuitable for host controllers compliant to USB 2.0.

SUMMARY OF THE INVENTION

[0010] It is therefore an objective of the invention to provide a chip test method, used for more precisely emulating actual operating conditions, so as to test a universal serial bus (USB) host controller.

[0011] In accordance with the foregoing and other objectives of the invention, the invention provides a chip test method, suitable for use in testing the USB host controller, wherein a client device is coupled to the host controller so as to test the USB host controller via the USB. The chip test method includes the following steps. First, the host controller and the client device are individually set in a test mode. Then, the client device performs a client-side test preparation action. Additionally, the host controller performs a host-side test preparation action. After that, the chip test for the host controller is performed. The host controller sequentially outputs a number of requests to the client device. On receiving the requests, the client device outputs simulated responses to the host controller, wherein the simulated responses are selected from correct responses corresponding to the requests, possible faulty responses, and error responses, which are possibly to be received by the host controller during actual operations. Finally, the host controller performs a verification test to verify whether the host controller works properly under the various simulated situations.

[0012] Other objects, features, and advantages of the invention will become apparent from the following detailed description of the preferred but non-limiting embodiments. The following description is made with reference to the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0013]FIG. 1 illustrates the coupling relationship between a universal serial bus host controller and a client device.

[0014]FIG. 2 is a flowchart illustrating a chip test method according to the preferred embodiment of the invention.

DETAILED DESCRIPTION OF THE INVENTION

[0015] According to the invention, various situations that can occur during actual operations of a host controller are taken into consideration in order to verify its functionality more precisely and completely. The chip test method first enables the host controller to output requests to a client device for testing, and simulated responses selected from correct responses corresponding to the requests, possible faulty responses, and error responses, which are possibly to be received by the host controller during actual operations, are then produced by the client device to test the host controller. These simulated responses can be, for example, the faulty or error actions caused by the client devices, or data packet loss due to bus congestion.

[0016] The chip test method is shown in FIG. 2 in flowchart form according a preferred embodiment of the invention. First, the method begins and enters step 202 to set the host controller and the client device individually in a test mode. The client device, used in the chip test, is implemented on another host controller dedicated for chip testing. Certainly, the client device can be a real-life client device, such as a computer peripheral device. In addition, such test device is used to simulate possible actual actions of the actual client device, so as to output the simulated response corresponding to the request received by the test device.

[0017] After that, step 204 is performed, in which the client device performs a client-side test preparation action. The client device can be coupled to a memory device, for example, the memory in a computer host. The memory device stores test data including a number of requests and a number of simulated responses corresponding to the requests, which are used in the chip test. When the client device performs a client-side test preparation action, the test data will be retrieved from the memory device and temporarily stored into a data buffer of the client device, which can be a synchronous dynamic random access memory (SDRAM).

[0018] In the invention, the simulated response is given notably under conditions that are not limited to the ideal situation, compared to the normal response with respect to each of the requests. In addition, the actual operation is taken consideration in the design of the simulated responses with respect to the requests individually, so as to simulate the actual operations in the chip test. For example, in response to a particular request, a simulated response that is a faulty or an error response is to be sent to the host controller. In this manner, all kinds of possible situations occurred during actual operations are simulated for the host controller in the chip test. Whether or not the host controller will operate properly is verified when various faulty or error responses are received with respect to a request from the host controller.

[0019] Step 206 is then performed, in which the host controller performs a host-side test preparation action. The host controller is also coupled to the memory device. When performing the test preparation action for the host controller, the host controller obtains the test data from the memory device and temporarily store it in a data buffer of the host controller, which can be a SDRAM device.

[0020] After that, step 208 is executed, in which a chip test is performed on the host controller. First, the host controller, according to the test data temporarily stored in the data buffer, sequentially outputs a number of requests to the client device via the universal serial bus. Next, the client device, in response to the received request, sequentially outputs the simulated response according to the test data temporarily stored in the data buffer. The simulated responses are delivered to the host controller via the universal serial bus. It should be noted that the simulated responses are selected from correct responses corresponding to the requests, possible faulty responses, and error responses, which constitute all of the possible responses to be received by the host controller during actual operations. Finally, the host controller performs a verification test to verify whether the received responses of the host controller are identical to the corresponding responses of the requests send from the host controller by comparing the received responses individually with the corresponding responses stored in the data buffer. If so, it indicates that the chip, i.e. the host controller, has passed the test. If a difference has occurred, it indicates that the chip has a defect and further inspection is necessary to perform. In addition, a number of status registers inside the host controller are also checked. If an error is found, a further inspection of the chip is necessary. In this manner, the various situations can be more precisely simulated for a USB host controller, so as to test the chip more thoroughly. In addition, according to the invention, the chip test method can be used in testing a host controller compliant with USB standard such as USB 1.x or USB 2.0 by designing corresponding test data, as described above.

[0021] The chip test method has been disclosed in the above embodiment of the invention. When considering actual operations, all possible occurrences, including normal and abnormal situations, have been considered so as to more precisely simulate all the possible situations that may be encountered during actual operations. The chip test can verify whether the host controller will operate properly after it receives a faulty or an error response to a request sent by the host controller.

[0022] While the invention has been described by way of example and in terms of a preferred embodiment, it is to be understood that the invention is not limited thereto. On the contrary, it is intended to cover various modifications and similar arrangements and procedures, and the scope of the appended claims therefore should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements and procedures. 

What is claimed is:
 1. A method for testing a host controller, in which a client device is coupled to said host controller via a bus so as to test said host controller, said method comprising the steps of: setting said host controller and said client device individually in a test mode; performing a client-side test preparation action at said client device; performing a host-side test preparation action at said host controller; sequentially outputting a plurality of requests from said host controller to said client device; in response to said requests, producing a plurality of simulated responses from said client device to said host controller, wherein said simulated responses are selected from correct responses corresponding to said requests, possible faulty responses, and error responses, which are possibly to be received by said host controller during actual operation; and performing a verification test at said host controller.
 2. The method as recited in claim 1, wherein said client device is installed on another host controller.
 3. The method as recited in claim 1, wherein said client device is coupled to a memory device for storing the corresponding simulated responses.
 4. The method as recited in claim 3, wherein said client device comprises a data buffer, and said client-side test preparation action comprises the step of: reading said corresponding simulated responses from said memory device, and temporarily storing said requests and said corresponding simulated responses into said data buffer.
 5. The method as recited in claim 4, wherein said data buffer is a synchronous dynamic random access memory (SDRAM).
 6. The method as recited in claim 1, wherein said host controller is coupled to a memory device for storing said requests.
 7. The method as recited in claim 6, wherein said host controller further comprises a data buffer, and said host-side test preparation action further comprises the step of: reading said requests from said memory device, and temporarily storing said requests and said corresponding simulated responses into said data buffer.
 8. The method as recited in claim 7, wherein said data buffer is a synchronous dynamic random access memory (SDRAM).
 9. The method as recited in claim 1, wherein said verification test comprises the step of: checking whether said response received by said host controller is correct, and whether status data stored in a plurality of status registers of said host controller is correct.
 10. The method as recited in claim 1, wherein said bus is a universal serial bus (USB).
 11. The method as recited in claim 10, wherein said universal serial bus is compliant with USB 2.0. 